-
Notifications
You must be signed in to change notification settings - Fork 93
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[3팀 김진현][Chapter 1-1] 프레임워크 없이 SPA 만들기 #15
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
라우터 가드를 페이지가 아닌 라우터 자체에서 하는 것도 괜찮아 보이는데 어떻게 생각하시나요,,!!
</li> | ||
</ul> | ||
</nav>`; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nav를 객체 배열로 만들어서 관리하는거 혹시 어떠신가요,,,!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
map으로 반복문 돌리는거 말씀하시는거죠? ㅎㅎ 유지보수 측면에서 좋은 방법인거같습니다
|
||
const profileLinkClass = | ||
currentPath === "/profile" ? "text-blue-600" : "text-gray-600"; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
경로부분이 하드코딩 되어있는데 상수로 뺀다면 더 편하게 관리할 수 있을거같아요!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
넵!ㅎㅎ 리뷰감사합니다 ㅎㅎ
export const user = new User(); | ||
export function isLoggedIn() { | ||
return user?.preferences?.username?.length > 0; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
export �const isLoggedIn =() => user?.preferences?.username?.length > 0;
이런식으로 축약해서 사용할 수도 있을 것 같습니다~!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
오호 넵 화살표함수로 작성하니 더 깔끔해보여 좋은거같습니다!
errorBoundary.id = "error-boundary"; | ||
errorBoundary.textContent = `오류 발생! ${event.message}`; | ||
document.body.appendChild(errorBoundary); | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
appendChild를 해주게 되면 repaint나 reflow가 일어날 수 있습니다. 미리 error-boundary를 만들고 에러가 발생하면 보여주는건 어떨까요~?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
아 이부분 생각도못했네요 감사합니다👍
export function HomePage() { | ||
let html; | ||
html = ` <div class="bg-gray-100 min-h-screen flex justify-center"> | ||
<div class="max-w-md w-full"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
html을 선언하고 한번만 할당하고 있어 const html = `` 이런식으로 바꿔 보는건 어떨까요~?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
그러네요 ㅎㅎ 피드백 감사합니다!
과제 체크포인트
기본과제
1) 라우팅 구현:
2) 사용자 관리 기능:
3) 프로필 페이지 구현:
4) 컴포넌트 기반 구조 설계:
5) 상태 관리 초기 구현:
6) 이벤트 처리 및 DOM 조작:
7) 기본적인 에러 처리:
심화과제
1) 고급 라우팅
2) 고급 이벤트 처리
리뷰 받고 싶은 내용
궁금한 점
과제를 수행하면서 느낀점
과제 시작 전 생각
과제 제출 후 생각
기타
과제 난이도